'''
Created on May 22, 2011

@author: Dima
'''
import bossapi
N = 720000000L

#This Function returns number of results of keyword 
#Using Boss Search Engine               

def bossSearchResults(keyword):
    searchval= keyword
    appId = 'NDK5RxPV34EeYsgrmer5dNvgfQaQYuU4VYT._GHo.nxdkl_2502aXf5DcFpIe0PdYQ--'
    boss = bossapi.Boss(appId)
    tempJson = boss.do_web_search(searchval)
    if (len(tempJson['ysearchresponse']['totalhits'])==2):
            return 0  
    totNum = tempJson['ysearchresponse']['totalhits']
    return long(totNum)
     

